package maitaole.result;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author 李杰
 * @Description 类的功能描述
 * @Date 2023/5/16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultNew {

    Boolean state;
    int code;
    String msg;
    Object data;

    public ResultNew sccuess(Object... data){

       this.state = true;
       this.code= 1;
       this.msg="操作成功";
       this.data=data;
       return this;
   }
    public ResultNew fail(){

        this.state = false;
        this.code= 0;
        this.msg="操作失败";
        return this;
    }

}

